/**
 * QueryBean.java   2018年4月1日 下午10:55:28 by xuebing 
 *
 * Copyright (c) 2010 - 2018 All rights reserved.
 * 
 */
package com.rongmai.db.mapper.param;

import java.io.Serializable;

public class QueryBean implements Serializable {

    private static final long serialVersionUID = 1L;
    private Integer pageNo = 1;
    private Integer offset = 0;
    private Integer size = 10;

    public Integer getPageNo() {
        if (this.pageNo == null) {
            this.pageNo = 1;
        }
        return this.pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getOffset() {
        if (this.pageNo == null || this.pageNo <= 1) {
            this.offset = 0;
        } else {
            this.offset = (this.pageNo - 1) * this.size;
        }
        return this.offset;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

}
